<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditBatchEntityTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_inventory}" for="inventory" />
                    <h:selectOneMenu id="inventory" value="#{batchEntityController.selected.inventory}" title="#{bundle.EditBatchEntityTitle_inventory}" >
                        <f:selectItems value="#{inventoryEntityController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_disposal}" for="disposal" />
                    <h:selectOneMenu id="disposal" value="#{batchEntityController.selected.disposal}" title="#{bundle.EditBatchEntityTitle_disposal}" >
                        <f:selectItems value="#{disposalEntityController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_expiryDate}" for="expiryDate" />
                    <h:inputText id="expiryDate" value="#{batchEntityController.selected.expiryDate}" title="#{bundle.EditBatchEntityTitle_expiryDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_product}" for="product" />
                    <h:selectOneMenu id="product" value="#{batchEntityController.selected.product}" title="#{bundle.EditBatchEntityTitle_product}" >
                        <f:selectItems value="#{productEntityController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_quantity}" for="quantity" />
                    <h:inputText id="quantity" value="#{batchEntityController.selected.quantity}" title="#{bundle.EditBatchEntityTitle_quantity}" />
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_id}" for="id" />
                    <h:inputText id="id" value="#{batchEntityController.selected.id}" title="#{bundle.EditBatchEntityTitle_id}" />
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_createdAt}" for="createdAt" />
                    <h:inputText id="createdAt" value="#{batchEntityController.selected.createdAt}" title="#{bundle.EditBatchEntityTitle_createdAt}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_createdBy}" for="createdBy" />
                    <h:inputText id="createdBy" value="#{batchEntityController.selected.createdBy}" title="#{bundle.EditBatchEntityTitle_createdBy}" />
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_lastModifiedAt}" for="lastModifiedAt" />
                    <h:inputText id="lastModifiedAt" value="#{batchEntityController.selected.lastModifiedAt}" title="#{bundle.EditBatchEntityTitle_lastModifiedAt}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditBatchEntityLabel_lastModifiedBy}" for="lastModifiedBy" />
                    <h:inputText id="lastModifiedBy" value="#{batchEntityController.selected.lastModifiedBy}" title="#{bundle.EditBatchEntityTitle_lastModifiedBy}" />
                </h:panelGrid>
                <h:commandLink action="#{batchEntityController.update}" value="#{bundle.EditBatchEntitySaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditBatchEntityViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{batchEntityController.prepareList}" value="#{bundle.EditBatchEntityShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditBatchEntityIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
